package singleton.lazy;

import singleton.lazy.LazyInnerClassSingleton;

import java.lang.reflect.Constructor;

/**
 * @author Feng
 * @date 2019/3/10 15:46
 */
public class BrokenLazyInnerClass {
    public static void main(String[] args) {
        try{
            Class<?> clazz = LazyInnerClassSingleton.class;
            Constructor<?> constructor = clazz.getDeclaredConstructor(null);
            //强吻
            constructor.setAccessible(true);

            Object obj = constructor.newInstance();

            Object obj1 = constructor.newInstance();

            System.out.println(obj == obj1);
        }
        catch (Exception e){
            e.printStackTrace();
        }
    }
}
